<?php
function getweek($time){
  $date=new DateTime($time);
  $date->modify('this week');
  $first_day_of_week=$date->format('U');
  //$date->modify('this week +7 days');
  //$end_day_of_week=$date->format('Y-m-d');
  return $first_day_of_week;
  //echo $end_day_of_week;
}
function getmonth($date){
  $firstday = strtotime(date('Y-m-01', strtotime($date)));
  return $firstday;
  //$lastday = date('Y-m-d', strtotime("$firstday +1 month -1 day"));
  //return array($firstday,$lastday);
}
echo getweek(date('Y-m-d',1479103352));
echo getweek(date('Y-m-d',1478958640));
exit;
$ss=exec('ps -ef | grep ffmpeg | wc -l');
echo $ss;
//echo exec('/usr/local/bin/ffmpeg -i /mnt/default/v.madv360.com/php/uploads/files/6ffeff352e3d7f6416dd40ea35ebbab3.mp4 2>&1 | sed -n "s/.*, \(.*\) fp.*/\1/p"');

